package com.dindang.propertyfee.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.dindang.propertyfee.mvp.contract.ReceivableDetailContract;
import com.dindang.propertyfee.mvp.model.ReceivableDetailModel;


@Module
public class ReceivableDetailModule {
    private ReceivableDetailContract.View view;

    /**
     * 构建ReceivableDetailModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public ReceivableDetailModule(ReceivableDetailContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ReceivableDetailContract.View provideReceivableDetailView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    ReceivableDetailContract.Model provideReceivableDetailModel(ReceivableDetailModel model) {
        return model;
    }
}